<?php

class DbItemMapping {
 public /* MappingRule[] */ $mappingRules = Array();
 public /* MappingRule */ $primaryKeyRule; // Must be in $mappingRules
 public /* String */ $table;

 public function addMapping(MappingRule $rule) {
     $this->mappingRules[$rule->attributeName] = $rule;
     if ($rule->is_pkey==true) {
         $this->primaryKeyRule=$rule;
     }
     return $this;
 }

 public function getRules() { return $this->mappingRules; }
 public function getTable() { return $this->table; }
 public function getPrimaryKeyRule() { return $this->primaryKeyRule; }

 function __construct($table) {
     $this->table = $table;
 }

}
?>
